<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class FileModel extends Model
{
    use HasFactory;
    protected $table = 'files';
    public $guarded = [];

    public static function find_by_path($path) {
        return self::where('path', $path)->first();
    }

    public static function find_by_hash($hash) {
        return self::where('hash', $hash)->first();
    }
}
